import request from "../util/requst";

export function query(params) {
  return request({
    url:"/user/",
    method:"get",
    params:params
  })
}

export function queryAll() {
  return request({
    url: "/user/queryAll/",
    method: "get"
  })
}

export function getById(id) {
  return request({
    url: "/user/"+id,
    method: "get"
  })
}


export function create(data) {
  return request({
    url: "/user/createUser",
    method: "post",
    data:data
  })
}

export function modfiy(data) {
  return request({
    url: "/user/update",
    method: "put",
    data:data
  })
}

export function remove(id) {
  return request({
    url: "/user/" + id,
    method: "delete"
  })
}


export function resetPassword(data) {
  return request({
    url: '/user/resetPassword',
    method: 'put',
    data: data
  })
}